<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>内容列表</title>
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<import type='js' file="js.main" />
</head>

<body>
<div class="main-frame">
	<div class="position">华人码 > 管理员列表</div>
	<div class="table-list">
	 <table width="100%" border="1" cellspacing="0" cellpadding="0">
		    <tr class="th-bg">
		      <th width="4%">序号</th>
		      <th width="30%">用户名</th>
		      <th width="22%">发布者名称</th>
		      <th width="10%">状态</th>
		      <th width="10%">创建时间</th>
		      <th width="10%">操作</th>
	        </tr>
	        <volist name='userlist' id='v' empty="暂无信息">
		    <tr class="tr-line">
		      <td>{$v.id}</td>
		      <td><div class="menutitle">{$v.username}</div></td>
		      <td>{$v.alias}</td>
              <td>
				  <a onclick="changestate('{:U('User/changestate',array('id'=>$v['id'],'state'=>$v['state'],'table'=>'article'))}')">
					  <if condition="$v['state'] eq 1">
						  <span class="topen" title="解锁"></span>
					  <else />
						  <span class="tclose" title="锁定"></span>
					  </if>
				  </a>
			  </td>
		      <td style="font-size:12px;">{$v.crdate}</td>
		      <td><a href="{:U('User/useredit',array('id'=>$v['id']))}">编辑</a> / <a class="resdel" refurl="{:U('Type/delete',array('id'=>$v['id'],'table'=>'user'))}">删除</a></td>
	        </tr>
	        </volist>
      </table>
    </div>
    <div class="page">{$page}</div>
</div>
<script type="text/javascript">
	$(function(){
		$("a.resdel").each(function(index, element) {
			var t = $(this);
			t.click(function(){
				var r=confirm("想好！确定要删除吗？");
				if (r==true){
					var refurl = $(this).attr('refurl');
					location.href = refurl;
				}else{
					return false;
				}
			})
		});
	})
</script>
</body>
</html>
